// ManualDlg.cpp : implementation file
//
#include   <stdlib.h>
#include "stdafx.h"
#include "resourcemakeDlg.h"
#include "CfgManualDlg.h"


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCfgManualDlg dialog


CCfgManualDlg::CCfgManualDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CCfgManualDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CCfgManualDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CCfgManualDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCfgManualDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here //test
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCfgManualDlg, CDialog)
	//{{AFX_MSG_MAP(CCfgManualDlg)
	ON_BN_CLICKED(IDC_MANUALBOTTON, OnManualbotton)
	ON_EN_CHANGE(IDC_EDIT1, OnChangeEdit1)
	ON_EN_CHANGE(IDC_EDIT2, OnChangeEdit2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCfgManualDlg message handlers

BOOL CCfgManualDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	CEdit*   pDB1   =   (CEdit*)GetDlgItem(IDC_EDIT1);   
  pDB1->SetWindowText(_T("800"));
  	CEdit*   pDB2   =   (CEdit*)GetDlgItem(IDC_EDIT2);   
  pDB2->SetWindowText(_T("600"));
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CCfgManualDlg::OnManualbotton() 
{
	// TODO: Add your control notification handler code here
	CString w1;
	CString h1;
	this->GetDlgItemText(IDC_EDIT1,w1);
	this->GetDlgItemText(IDC_EDIT2,h1);
	CDialogbase* pDlgBase = (CDialogbase*)GetParent();

	pDlgBase->width = strtoul(w1,NULL,10);   

	pDlgBase->height =strtoul(h1,NULL,10); 	
}

void CCfgManualDlg::OnChangeEdit1() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	
}

void CCfgManualDlg::OnChangeEdit2() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	
}
